// @ts-ignore
import App from "./App.tsx";
import pinia from "@/store/store";
import router from "@/routes/index";
import "@/styles/index.less";
import "flag-icon-css/css/flag-icons.css";
import AntIcons from "@/assets/icons/ant-icons";
import "lib-flexible/flexible.js";
import "@/assets/font/iconfont.css";
import utils from "@/utils";
import directives from "./assets/directives";
import AntDesignVue from "@/components/ant-design-vue";
import common from "@/components/common";
import UUID from "vue3-uuid";
import vue3videoPlay from "vue3-video-play";
import "vue3-video-play/dist/style.css";
import vPreviewImage from "v-preview-image";
import I18n from "@/lang/i18n";
const app = createApp(App);
app.config.warnHandler = (msg, instance, trace) => {};
app.use(I18n);
app.use(vue3videoPlay);
app.use(vPreviewImage, {
  activeColor: "#ff0033",
  enabledMaskClose: true,
  enabledEscClose: true,
  enabledMouseZoom: true,
});
app.use(UUID);
app.use(AntDesignVue);
app.use(common);
app.use(utils);
app.use(directives);
app.use(pinia);
app.use(router);
app.mount("#app");
app.use(AntIcons);
window.addEventListener("online", () => {
  message.success("您已上线");
});
window.addEventListener("offline", () => {
  message.error("当前网络已离线");
});
